/*
    Copyright (C) 2025 mio <stigma@disroot.org>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef ASTER_CONTROLBAR_H
#define ASTER_CONTROLBAR_H

#include <tqwidget.h>

class AsterSlider;
class TQToolButton;

class ControlBar : public TQWidget
{
    TQ_OBJECT

public:
    ControlBar(TQWidget *parent = nullptr, const char *name = nullptr);

signals:
    void muteChanged(bool on);
    void next();
    void pause();
    void play();
    void previous();
    void seek(int);
    void stop();
    void volumeChanged(int);

public slots:
    void lengthChanged(int);
    void setState(int);
    void tick(int64_t);

protected:
    TQToolButton *m_muteButton;
    TQToolButton *m_playButton;
    AsterSlider *m_slider;
    AsterSlider *m_volume;

protected slots:
    void playClicked();
    void slotMuteClicked();
    void slotVolumeChanged(int);

private:
    int m_playerState;
};

#endif
